package cn.lg.soar.boot.fc.entity;

import cn.lg.soar.core.annotations.constraints.group.*;
import cn.lg.soar.database.query.annotations.*;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import lombok.Data;
import java.io.Serializable;
import java.time.*;
import javax.validation.constraints.*;

import cn.lg.soar.database.base.entity.BaseEntity;

/**
 * 变更表
 * @author ZhuanZ（无密码）
 * @since 2025-02-06
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@ApiModel(value = "Change", description = "变更表")
@TableName("fc_change")
public class Change extends BaseEntity {

    /** 变更id */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 房间id */
    @NotNull(message = "房间id不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "房间id")
    @ApiModelProperty(value = "房间id")
    private Long roomId;

    /** 房间号 */
    @NotBlank(message = "房间号不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "房间号")
    @ApiModelProperty(value = "房间号")
    private String roomCode;

    /** 变更人 */
    @ExcelProperty(value = "变更人")
    @ApiModelProperty(value = "变更人")
    private Long changeU;

    /** 版本 */
    @ExcelProperty(value = "版本")
    @ApiModelProperty(value = "版本")
    private Integer version;

    /** 扩展字段1 */
    @ExcelProperty(value = "扩展字段1")
    @ApiModelProperty(value = "扩展字段1")
    private String extend1;

    /** 扩展字段2 */
    @ExcelProperty(value = "扩展字段2")
    @ApiModelProperty(value = "扩展字段2")
    private String extend2;

    /** 扩展字段3 */
    @ExcelProperty(value = "扩展字段3")
    @ApiModelProperty(value = "扩展字段3")
    private String extend3;

    @ApiModelProperty(value = "新旧参数对照json")
    private String message;

    @JsonIgnore
    @Override
    public Long primaryKey() {
        return this.id;
    }

}
